import request from '@/utils/request' 

//plc数据
export function plcData(robotid){
	const data = {
		robotid
	}
	return request({
		'url':'/appmanage/plcconn',
		headers: {
		  isToken: false
		},
		'method':'get',
		'data':data
	})
}

//查询机器人列表
export function RobotsList(token,secretKey,id){
	const data = {
		token,
		secretKey,
		id
	}
	return request({
		'url':'/appmanage/robotslist',
		headers: {
		  isToken: false
		},
		'method':'get',
		'data':data
	})
}

//电子地图
export function getTrackMaprobot(robotid){
	const data = {
		robotid
	}
	return request({
		'url':'/appmanage/getinfomap',
		headers: {
		  isToken: false
		},
		'method':'get',
		'data':data
	})
}

//视频地址-----前摄像头
export function QVideo(rtspUrl){
	const data = {
		rtspUrl
	}
	return request({
		'url':'/appmanage/getQFlvUrl',
		headers: {
		  isToken: false
		},
		'method':'get',
		'data':data
	})
}

//视频地址-----后摄像头
export function HVideo(rtspUrl){
	const data = {
		rtspUrl
	}
	return request({
		'url':'/appmanage/getHFlvUrl',
		headers: {
		  isToken: false
		},
		'method':'get',
		'data':data
	})
}

//视频地址-----前摄像头暂停
export function QVideoStop(){
	return request({
		'url':'/appmanage/stopBefore',
		headers: {
		  isToken: false
		},
		'method':'post'
	})
}

//视频地址-----后摄像头暂停
export function HVideoStop(){
	return request({
		'url':'/appmanage/stopAfter',
		headers: {
		  isToken: false
		},
		'method':'post'
	})
}